Appearance
XBRL Schemas
XBRL Schemas are XML Schema Definition (.xsd) files that define concepts -- the data elements that can be reported in instance documents.
What a Schema Defines
Each concept (element) in a schema has these key attributes:
| Attribute | Purpose | Example |
|---|---|---|
name | Identifier for the concept | Revenue |
id | Unique ID within the schema | ifrs_Revenue |
type | Data type | xbrli:monetaryItemType |
substitutionGroup | Must be xbrli:item or xbrli:tuple | xbrli:item |
periodType | instant or duration | duration |
balance | debit or credit (monetary items only) | credit |
abstract | If true, cannot hold data (structural only) | false |
nillable | Whether nil values are allowed | true |
Common Data Types
| Type | Use |
|---|---|
xbrli:monetaryItemType | Currency amounts (Revenue, Assets) |
xbrli:stringItemType | Text (descriptions, names) |
xbrli:dateItemType | Dates |
xbrli:booleanItemType | True/false values |
xbrli:integerItemType | Whole numbers |
xbrli:decimalItemType | Decimal numbers |
xbrli:sharesItemType | Share counts |
xbrli:pureItemType | Dimensionless numbers (ratios, percentages) |
Period Types
instant-- Point-in-time values (e.g., balance sheet items like Assets, Liabilities)duration-- Values over a time range (e.g., income statement items like Revenue, Expenses)
Example from the LEI Taxonomy
xml
<xsd:element name="LEI"
id="lei_LEI"
substitutionGroup="xbrli:item"
nillable="true"
xbrli:periodType="duration"
type="lei:leiItemType" />This defines a concept called LEI that:
- Is an item (can hold a value)
- Has period type
duration - Uses a custom type
leiItemType(a 20-character alphanumeric string)
Schema References
Schemas reference linkbases via <link:linkbaseRef> elements in the annotation section:
xml
<xsd:annotation>
<xsd:appinfo>
<link:linkbaseRef xlink:href="labels.xml"
xlink:role="http://www.xbrl.org/2003/role/labelLinkbaseRef"
xlink:arcrole="http://www.w3.org/1999/xlink/properties/linkbase"/>
</xsd:appinfo>
</xsd:annotation>Schema Imports
Schemas can import other schemas to build on existing taxonomies:
xml
<xsd:import namespace="http://www.xbrl.org/2003/instance"
schemaLocation="http://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd"/>This is how extension taxonomies build on base taxonomies -- the CIPC taxonomy imports the IFRS taxonomy this way.